"""
#!/usr/bin/python3
# coding:utf-8            
#
# Copyright (C) 2024 - 2024 Jasonakeke， Inc. All Rights Reserved 
# @Desc	   ：
# @Time    : 2024/8/6 18:09
# @Author  : Code_By_Jasonakeke
# @Email   : 2284037977@qq.com
# @File    : 03_测试器.py
# @IDE     : PyCharm
"""
from re import match

from flask import Flask, render_template

app = Flask(__name__)


def test_phone(phone):
	phone_re = r'1[3-9]\d{9}'
	return match(phone_re, phone)


@app.template_test('start_with')
def start_with(str, prefix):
	return str.lower().startswith(prefix.lower())


app.jinja_env.tests['is_phone'] = test_phone


@app.route('/')
def hello_world():  # put application's code here
	return render_template('09-测试器.html')


if __name__ == '__main__':
	app.run()
